package cn.wetcland.urban.common.pojo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class PathPlanningPOJO {

    @JsonProperty("status")
    private String status;
    @JsonProperty("info")
    private String info;
    @JsonProperty("infocode")
    private String infocode;
    @JsonProperty("count")
    private String count;
    @JsonProperty("route")
    private RouteDTO route;

    @NoArgsConstructor
    @Data
    public static class RouteDTO {
        @JsonProperty("origin")
        private String origin;
        @JsonProperty("destination")
        private String destination;
        @JsonProperty("taxi_cost")
        private String taxiCost;
        @JsonProperty("paths")
        private List<PathsDTO> paths;

        @NoArgsConstructor
        @Data
        public static class PathsDTO {
            @JsonProperty("distance")
            private String distance;
            @JsonProperty("duration")
            private String duration;
            @JsonProperty("strategy")
            private String strategy;
            @JsonProperty("tolls")
            private String tolls;
            @JsonProperty("toll_distance")
            private String tollDistance;
            @JsonProperty("steps")
            private List<StepsDTO> steps;
            @JsonProperty("restriction")
            private String restriction;
            @JsonProperty("traffic_lights")
            private String trafficLights;

            @NoArgsConstructor
            @Data
            public static class StepsDTO {
                @JsonProperty("instruction")
                private String instruction;
                @JsonProperty("orientation")
                private String orientation;
                @JsonProperty("distance")
                private String distance;
                @JsonProperty("tolls")
                private String tolls;
                @JsonProperty("toll_distance")
                private String tollDistance;
                @JsonProperty("toll_road")
                private List<?> tollRoad;
                @JsonProperty("duration")
                private String duration;
                @JsonProperty("polyline")
                private String polyline;
                @JsonProperty("action")
                private String action;
                @JsonProperty("assistant_action")
                private String assistantAction;
                @JsonProperty("tmcs")
                private List<TmcsDTO> tmcs;
                @JsonProperty("cities")
                private List<CitiesDTO> cities;
                @JsonProperty("road")
                private String road;

                @NoArgsConstructor
                @Data
                public static class TmcsDTO {
                    @JsonProperty("lcode")
                    private List<?> lcode;
                    @JsonProperty("distance")
                    private String distance;
                    @JsonProperty("status")
                    private String status;
                    @JsonProperty("polyline")
                    private String polyline;
                }

                @NoArgsConstructor
                @Data
                public static class CitiesDTO {
                    @JsonProperty("name")
                    private String name;
                    @JsonProperty("citycode")
                    private String citycode;
                    @JsonProperty("adcode")
                    private String adcode;
                    @JsonProperty("districts")
                    private List<DistrictsDTO> districts;

                    @NoArgsConstructor
                    @Data
                    public static class DistrictsDTO {
                        @JsonProperty("name")
                        private String name;
                        @JsonProperty("adcode")
                        private String adcode;
                    }
                }
            }
        }
    }
}
